home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Format 1994 October
/
Macformat17.cdr
/
Shareware City
/
Developers
/
Think C dcmd 1.0 ƒ
/
Read me first !
next >
Wrap
Text File
|
1994-06-19
|
5KB
|
106 lines
**********************
* Think C dcmd 1.0 *
**********************
Written by P. Stadelmann, June 1994.
•• Introduction ••
This package allows you to write dcmds in Think C. It contains the glue code
necessary to link the "dcmd.o" library, and Think Put, a collection of routines
to create formatted output in dcmds.
•• How to use (Think C 7.0 or later) ••
The following applies to Think C 7.0 or later. If you use an earlier version
of Think C, please refer to "How to use (Think C 6.0.x or earlier)"
1) Put the files "Think_dcmd.h", "Think_put.h", "Think dcmd glue" and "Think Put Lib"
where the Project Manager can find them (like in the "Mac Librairies" and
"Mac #includes" folders).
2) Do the same with the files "dcmd.h" and "dcmdGlue.a.o". These files are available
along with MacsBug from ftp.apple.com in the dts/mac/tools/macsbug/ directory.
3) Drop the folder named "Think dcmd" into the (Project Models) folder.
4) In the Project Manager, create a new project. Choose "Think dcmd" in project list.
Add your code in the dcmd.c file : write the CommandEntry code as described in
chapter 8 of the book "MacsBug Reference and Debugging Reference" from
Apple Computer, Inc.
5) Use the "Set Project Type" command to choose the name and id of your dcmd. Remember
that the dcmd name (used to run the dcmd in MacsBug) is the name of the dcmd resource.
6) Once you have built the dcmd, use a resource editor to copy the dcmd into the
"Debugger Prefs" file inside your system folder.
•• How to use (Think C 6.0.x or earlier) ••
1) Delete the "Think dcmd glue" and "Think Put Lib" project files, because they can
only be used with Think C 7.0 or later.
2) Create an empty project named "Think dcmd glue". Add the file "Think dcmd glue.c"
from the "Think dcmd glue source" folder to the project. Set the project type to
"Code resource". Bring the project up to date.
3) Create an empty project named "Think Put Lib". Add all the files from the
"Think Put Lib source" folder to the project. Set the project type to
"Code resource". Bring the project up to date.
4) Put the files "Think_dcmd.h", "Think_put.h", "Think dcmd glue" and "Think Put Lib"
where the Project Manager can find them (like in the "Mac Librairies" and
"Mac #includes" folders).
5) Do the same with the files "dcmd.h" and "dcmdGlue.a.o". These files are available
along with MacsBug from ftp.apple.com in the dts/mac/tools/macsbug/ directory.
If you have Think C 5.0.x or earlier, convert the "dcmdGlue.a.o" library into
an A4-based project with the "oConv" application.
6) Create a new project. Add the "dcdmGlue.a.o" library (or the corresponding
converted project file), the "Think dcmd glue" file and a copy of the "dcmd.c" file
to your project. Add your code in the dcmd.c file : write the CommandEntry code as
described in chapter 8 of the book "MacsBug Reference and Debugging Reference"
from Apple Computer, Inc.
5) Using the "Set Project Type" command, set the project type to "Code resource", the
type to 'dcmd'. Choose the name and id of your dcmd. Remember that the dcmd name
(used to run the dcmd in MacsBug) is the name of the dcmd resource. Set the file
type to 'rsrc' and the creator to 'RSED'.
VERY IMPORTANT : Check the "Custom header" checkbox.
6) Once you have built the dcmd, use a resource editor to copy the dcmd into the
"Debugger Prefs" file inside your system folder.
•• Notes ••
◊ In Think C 7.0 or later, execute step 1-3 only once. For each new dcmd you want
to write, start at step 4.
◊ In Think C 6.0.x or earlier, execute step 1-5 only once. For each new dcmd you want
to write, start at step 6.
◊ If you want to use global variables, #include <SetUpA4.h> in the begining of the
dcmd.c file. Call RememmberA0() and SetUpA4() in the begining of the CommandEntry
procedure, and RestoreA4() in the end.
◊ To use the Think Put Library, add the "Think Put Lib" file to your project and
#include <Think_put.h> in the beginning of the dcmd.c file
◊ The Think Put Library in this package requires globals.
•• About ••
Written by P. Stadelmann <Patrick.Stadelmann@etudiants.unine.ch>.
Feel free to contact me if you have comments, suggestions or bugs to report.
Thanks to R. Wesley.
This package is public domain. However, the "dcmd.h" and "dcmdGlue.a.o"
files are copyrighted material from Apple Computer, Inc.